Ext.define('SKJF.view.PEMBELIAN.v_beaimport_form', {
	extend	: 'Ext.form.Panel',
	
	alias	: 'widget.v_beaimport_form',
	
	//region:'east',
	//id: 'east-region-container',
	
	title		: 'Create/Update beaimport',
    bodyPadding	: 5,
    autoScroll	: true,
    
    initComponent: function(){
    	/*
		 * Deklarasi variable setiap field
		 */
		 
		var NOMOR_LPB_field = Ext.create('Ext.form.field.Text', {
			itemId: 'NOMOR_LPB_field',
			name: 'NOMOR_LPB', /* column name of table */
			fieldLabel: 'NOMOR_LPB',
			allowBlank: false /* jika primary_key */,
			maxLength: 25 /* length of column name */
		});
		var TANGGAL_LPB_field = Ext.create('Ext.form.field.Date', {
			name: 'TANGGAL_LPB', /* column name of table */
			format: 'Y-m-d',
			fieldLabel: 'TANGGAL_LPB'
		});
		var NOMOR_PIB_field = Ext.create('Ext.form.field.Text', {
			name: 'NOMOR_PIB', /* column name of table */
			fieldLabel: 'NOMOR_PIB',
			maxLength: 25 /* length of column name */
		});
		var NOMOR_INV_field = Ext.create('Ext.form.field.Text', {
			name: 'NOMOR_INV', /* column name of table */
			fieldLabel: 'NOMOR_INV',
			maxLength: 25 /* length of column name */
		});
		var TANGGAL_INV_field = Ext.create('Ext.form.field.Date', {
			name: 'TANGGAL_INV', /* column name of table */
			format: 'Y-m-d',
			fieldLabel: 'TANGGAL_INV'
		});
		var BEA_KOMISI_BANK_field = Ext.create('Ext.ux.form.NumericField', {
			name: 'BEA_KOMISI_BANK', /* column name of table */
			fieldLabel: 'BEA_KOMISI_BANK',
			useThousandSeparator: true,
			decimalPrecision: 2,
			alwaysDisplayDecimals: true,
			// currencySymbol: 'Rp',
			thousandSeparator: '.',
			decimalSeparator: ','
		});
		var BEA_KOMISI_ACP_field = Ext.create('Ext.ux.form.NumericField', {
			name: 'BEA_KOMISI_ACP', /* column name of table */
			fieldLabel: 'BEA_KOMISI_ACP',
			useThousandSeparator: true,
			decimalPrecision: 2,
			alwaysDisplayDecimals: true,
			// currencySymbol: 'Rp',
			thousandSeparator: '.',
			decimalSeparator: ','
		});
		var BEA_ADM_field = Ext.create('Ext.ux.form.NumericField', {
			name: 'BEA_ADM', /* column name of table */
			fieldLabel: 'BEA_ADM',
			useThousandSeparator: true,
			decimalPrecision: 2,
			alwaysDisplayDecimals: true,
			// currencySymbol: 'Rp',
			thousandSeparator: '.',
			decimalSeparator: ','
		});
		var BEA_PREMI_ASR_field = Ext.create('Ext.ux.form.NumericField', {
			name: 'BEA_PREMI_ASR', /* column name of table */
			fieldLabel: 'BEA_PREMI_ASR',
			useThousandSeparator: true,
			decimalPrecision: 2,
			alwaysDisplayDecimals: true,
			// currencySymbol: 'Rp',
			thousandSeparator: '.',
			decimalSeparator: ','
		});
		var BEA_IMPORT_field = Ext.create('Ext.ux.form.NumericField', {
			name: 'BEA_IMPORT', /* column name of table */
			fieldLabel: 'BEA_IMPORT',
			useThousandSeparator: true,
			decimalPrecision: 2,
			alwaysDisplayDecimals: true,
			// currencySymbol: 'Rp',
			thousandSeparator: '.',
			decimalSeparator: ','
		});
		var BEA_INCLARING_field = Ext.create('Ext.ux.form.NumericField', {
			name: 'BEA_INCLARING', /* column name of table */
			fieldLabel: 'BEA_INCLARING',
			useThousandSeparator: true,
			decimalPrecision: 2,
			alwaysDisplayDecimals: true,
			// currencySymbol: 'Rp',
			thousandSeparator: '.',
			decimalSeparator: ','
		});
		var BEA_TOTAL_field = Ext.create('Ext.ux.form.NumericField', {
			name: 'BEA_TOTAL', /* column name of table */
			fieldLabel: 'BEA_TOTAL',
			useThousandSeparator: true,
			decimalPrecision: 2,
			alwaysDisplayDecimals: true,
			// currencySymbol: 'Rp',
			thousandSeparator: '.',
			decimalSeparator: ','
		});
		var DIBUAT_OLEH_field = Ext.create('Ext.form.field.Text', {
			name: 'DIBUAT_OLEH', /* column name of table */
			fieldLabel: 'DIBUAT_OLEH',
			maxLength: 50 /* length of column name */
		});
		var JUMLAH_EDIT_field = Ext.create('Ext.form.field.Number', {
			name: 'JUMLAH_EDIT', /* column name of table */
			fieldLabel: 'JUMLAH_EDIT',
			maxLength: 11 /* length of column name */
		});
		var TANGGAL_EDIT_field = Ext.create('Ext.form.field.Date', {
			name: 'TANGGAL_EDIT', /* column name of table */
			format: 'Y-m-d',
			fieldLabel: 'TANGGAL_EDIT'
		});		
        Ext.apply(this, {
            fieldDefaults: {
                labelAlign: 'right',
                labelWidth: 120,
                msgTarget: 'qtip',
				anchor: '100%'
            },
			defaultType: 'textfield',
            items: [NOMOR_LPB_field,TANGGAL_LPB_field,NOMOR_PIB_field,NOMOR_INV_field,TANGGAL_INV_field,BEA_KOMISI_BANK_field,BEA_KOMISI_ACP_field,BEA_ADM_field,BEA_PREMI_ASR_field,BEA_IMPORT_field,BEA_INCLARING_field,BEA_TOTAL_field,DIBUAT_OLEH_field,JUMLAH_EDIT_field,TANGGAL_EDIT_field],
			
	        buttons: [{
                iconCls: 'icon-save',
                itemId: 'save',
                text: 'Save',
                disabled: true,
                action: 'save'
            }, {
                iconCls: 'icon-add',
				itemId: 'create',
                text: 'Create',
                action: 'create'
            }, {
                iconCls: 'icon-reset',
                text: 'Cancel',
                action: 'cancel'
            }]
        });
        
        this.callParent();
    }
});